package day6.Exer;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Exer0 {
    public static void main(String[] args) {
        Calendar now=Calendar.getInstance();
        String[]str={"星期日","星期一","星期二","星期三","星期四","星期五","星期六"};
        System.out.println("现在时间是："+str[now.get(Calendar.DAY_OF_WEEK)-1]+","+now.get(Calendar.DATE)+","+(now.get(Calendar.MONTH)+1)+","+now.get(Calendar.YEAR));
//        System.out.printf("现在的时间是：%tc%n",now.getTime());
//        String s= SimpleDateFormat.getDateInstance(DateFormat.FULL).format(now.getTime());
//        System.out.println("现在的时间是："+s);
    }
}
